<div class="row">
    <div class="col-lg-12">
        <div class="ibox ">
            <div class="ibox-title">
                <h5>业主信息</h5>
                <div class="ibox-tools" style="top:10px;">
                    <button type="button" class="btn btn-primary btn-sm" v-if="viewOwnerInfo.showCallBackButton=='true'"
                            v-on:click="_callBackListOwner(viewOwnerInfo.ownerId)">
                        返回
                    </button>
                    <button type="button" class="btn btn-primary btn-sm" v-if="viewOwnerInfo.viewOwnerFlag!='Owner'"
                            v-on:click="_openChooseOwner()">
                        选择业主
                    </button>
                </div>
            </div>
            <div class="ibox-content">
                <div class="row">
                    <div class="col-sm-2">
                        <image width="120px" height="140px" v-bind:src="viewOwnerInfo.ownerPhoto"
                               @error="errorLoadImg"/>
                    </div>
                    <div class="col-sm-9">
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label class="col-form-label">业主ID：</label>
                                    <label class="">{{viewOwnerInfo.ownerId}}</label>
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label class="col-form-label">名称：</label>
                                    <label class="">{{viewOwnerInfo.name}}</label>
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label class="col-form-label">性别：</label>
                                    <label class="">{{viewOwnerInfo.sex == 0 ? '男' : '女'}}</label>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label class="col-form-label">年龄：</label>
                                    <label class="">{{viewOwnerInfo.age}}</label>
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label class="col-form-label">身份证：</label>
                                    <label class="">{{viewOwnerInfo.idCard}}</label>
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label class="col-form-label">联系方式：</label>
                                    <label class="">{{viewOwnerInfo.link}}</label>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label class="col-form-label">创建员工：</label>
                                    <label class="">{{viewOwnerInfo.userName}}</label>
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label class="col-form-label">备注：</label>
                                    <label class="">{{viewOwnerInfo.remark}}</label>
                                </div>
                            </div>
                        </div>

                        <div v-for="(item,index) in viewOwnerInfo.attrs">

                            <div class="row" v-if="index % 3 == 0">
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">{{item.specName}}：</label>
                                        <label class="">{{item.valueName}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-4" v-if="index < viewOwnerInfo.attrs.length-1">
                                    <div class="form-group">
                                        <label class="col-form-label">{{viewOwnerInfo.attrs[index+1].specName}}：</label>
                                        <label class="">{{viewOwnerInfo.attrs[index+1].valueName}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-4" v-if="index < viewOwnerInfo.attrs.length-2">
                                    <div class="form-group">
                                        <label class="col-form-label">{{viewOwnerInfo.attrs[index+2].specName}}：</label>
                                        <label class="">{{viewOwnerInfo.attrs[index+2].valueName}}</label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

    <vc:create path="property/searchOwner"
               emitChooseOwner="viewOwnerInfo"
               emitLoadData="viewOwnerInfo"
    ></vc:create>
</div>
